Optimal. Leaf size=116 \[ \frac {\left (a^2+b^2\right )^2 \log (a+b \tan (c+d x))}{b^5 d}-\frac {a \left (a^2+2 b^2\right ) \tan (c+d x)}{b^4 d}+\frac {\left (a^2+2 b^2\right ) \tan ^2(c+d x)}{2 b^3 d}-\frac {a \tan ^3(c+d x)}{3 b^2 d}+\frac {\tan ^4(c+d x)}{4 b d} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.08, antiderivative size = 116, normalized size of antiderivative = 1.00, number of steps
used = 3, number of rules used = 2, integrand size = 21, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.095, Rules used = {3587, 711}
\begin {gather*} \frac {\left (a^2+b^2\right )^2 \log (a+b \tan (c+d x))}{b^5 d}-\frac {a \left (a^2+2 b^2\right ) \tan (c+d x)}{b^4 d}+\frac {\left (a^2+2 b^2\right ) \tan ^2(c+d x)}{2 b^3 d}-\frac {a \tan ^3(c+d x)}{3 b^2 d}+\frac {\tan ^4(c+d x)}{4 b d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 711
Rule 3587
Rubi steps
\begin {align*} \int \frac {\sec ^6(c+d x)}{a+b \tan (c+d x)} \, dx &=\frac {\text {Subst}\left (\int \frac {\left (1+\frac {x^2}{b^2}\right )^2}{a+x} \, dx,x,b \tan (c+d x)\right )}{b d}\\ &=\frac {\text {Subst}\left (\int \left (\frac {a \left (-a^2-2 b^2\right )}{b^4}+\frac {\left (a^2+2 b^2\right ) x}{b^4}-\frac {a x^2}{b^4}+\frac {x^3}{b^4}+\frac {\left (a^2+b^2\right )^2}{b^4 (a+x)}\right ) \, dx,x,b \tan (c+d x)\right )}{b d}\\ &=\frac {\left (a^2+b^2\right )^2 \log (a+b \tan (c+d x))}{b^5 d}-\frac {a \left (a^2+2 b^2\right ) \tan (c+d x)}{b^4 d}+\frac {\left (a^2+2 b^2\right ) \tan ^2(c+d x)}{2 b^3 d}-\frac {a \tan ^3(c+d x)}{3 b^2 d}+\frac {\tan ^4(c+d x)}{4 b d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 1.28, size = 119, normalized size = 1.03 \begin {gather*} \frac {3 b^4 \sec ^4(c+d x)+2 b^2 \sec ^2(c+d x) \left (3 \left (a^2+b^2\right )-2 a b \tan (c+d x)\right )-4 \left (3 \left (a^2+b^2\right )^2 (\log (\cos (c+d x))-\log (a \cos (c+d x)+b \sin (c+d x)))+a b \left (3 a^2+5 b^2\right ) \tan (c+d x)\right )}{12 b^5 d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.38, size = 106, normalized size = 0.91
method | result | size |
derivativedivides | \(\frac {-\frac {-\frac {\left (\tan ^{4}\left (d x +c \right )\right ) b^{3}}{4}+\frac {a \left (\tan ^{3}\left (d x +c \right )\right ) b^{2}}{3}-\frac {\left (a^{2}+2 b^{2}\right ) \left (\tan ^{2}\left (d x +c \right )\right ) b}{2}+a \left (a^{2}+2 b^{2}\right ) \tan \left (d x +c \right )}{b^{4}}+\frac {\left (a^{4}+2 a^{2} b^{2}+b^{4}\right ) \ln \left (a +b \tan \left (d x +c \right )\right )}{b^{5}}}{d}\) | \(106\) |
default | \(\frac {-\frac {-\frac {\left (\tan ^{4}\left (d x +c \right )\right ) b^{3}}{4}+\frac {a \left (\tan ^{3}\left (d x +c \right )\right ) b^{2}}{3}-\frac {\left (a^{2}+2 b^{2}\right ) \left (\tan ^{2}\left (d x +c \right )\right ) b}{2}+a \left (a^{2}+2 b^{2}\right ) \tan \left (d x +c \right )}{b^{4}}+\frac {\left (a^{4}+2 a^{2} b^{2}+b^{4}\right ) \ln \left (a +b \tan \left (d x +c \right )\right )}{b^{5}}}{d}\) | \(106\) |
risch | \(\frac {-2 i a^{3} {\mathrm e}^{6 i \left (d x +c \right )}-2 i a \,b^{2} {\mathrm e}^{6 i \left (d x +c \right )}+2 a^{2} b \,{\mathrm e}^{6 i \left (d x +c \right )}+2 b^{3} {\mathrm e}^{6 i \left (d x +c \right )}-6 i a^{3} {\mathrm e}^{4 i \left (d x +c \right )}-10 i a \,b^{2} {\mathrm e}^{4 i \left (d x +c \right )}+4 a^{2} b \,{\mathrm e}^{4 i \left (d x +c \right )}+8 b^{3} {\mathrm e}^{4 i \left (d x +c \right )}-6 i a^{3} {\mathrm e}^{2 i \left (d x +c \right )}-\frac {34 i a \,b^{2} {\mathrm e}^{2 i \left (d x +c \right )}}{3}+2 a^{2} b \,{\mathrm e}^{2 i \left (d x +c \right )}+2 b^{3} {\mathrm e}^{2 i \left (d x +c \right )}-2 i a^{3}-\frac {10 i a \,b^{2}}{3}}{b^{4} d \left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right )^{4}}-\frac {\ln \left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right ) a^{4}}{b^{5} d}-\frac {2 \ln \left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right ) a^{2}}{b^{3} d}-\frac {\ln \left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right )}{b d}+\frac {\ln \left ({\mathrm e}^{2 i \left (d x +c \right )}-\frac {i b +a}{i b -a}\right ) a^{4}}{b^{5} d}+\frac {2 \ln \left ({\mathrm e}^{2 i \left (d x +c \right )}-\frac {i b +a}{i b -a}\right ) a^{2}}{b^{3} d}+\frac {\ln \left ({\mathrm e}^{2 i \left (d x +c \right )}-\frac {i b +a}{i b -a}\right )}{b d}\) | \(398\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.27, size = 108, normalized size = 0.93 \begin {gather*} \frac {\frac {3 \, b^{3} \tan \left (d x + c\right )^{4} - 4 \, a b^{2} \tan \left (d x + c\right )^{3} + 6 \, {\left (a^{2} b + 2 \, b^{3}\right )} \tan \left (d x + c\right )^{2} - 12 \, {\left (a^{3} + 2 \, a b^{2}\right )} \tan \left (d x + c\right )}{b^{4}} + \frac {12 \, {\left (a^{4} + 2 \, a^{2} b^{2} + b^{4}\right )} \log \left (b \tan \left (d x + c\right ) + a\right )}{b^{5}}}{12 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.41, size = 183, normalized size = 1.58 \begin {gather*} \frac {6 \, {\left (a^{4} + 2 \, a^{2} b^{2} + b^{4}\right )} \cos \left (d x + c\right )^{4} \log \left (2 \, a b \cos \left (d x + c\right ) \sin \left (d x + c\right ) + {\left (a^{2} - b^{2}\right )} \cos \left (d x + c\right )^{2} + b^{2}\right ) - 6 \, {\left (a^{4} + 2 \, a^{2} b^{2} + b^{4}\right )} \cos \left (d x + c\right )^{4} \log \left (\cos \left (d x + c\right )^{2}\right ) + 3 \, b^{4} + 6 \, {\left (a^{2} b^{2} + b^{4}\right )} \cos \left (d x + c\right )^{2} - 4 \, {\left (a b^{3} \cos \left (d x + c\right ) + {\left (3 \, a^{3} b + 5 \, a b^{3}\right )} \cos \left (d x + c\right )^{3}\right )} \sin \left (d x + c\right )}{12 \, b^{5} d \cos \left (d x + c\right )^{4}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {\sec ^{6}{\left (c + d x \right )}}{a + b \tan {\left (c + d x \right )}}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.51, size = 120, normalized size = 1.03 \begin {gather*} \frac {\frac {3 \, b^{3} \tan \left (d x + c\right )^{4} - 4 \, a b^{2} \tan \left (d x + c\right )^{3} + 6 \, a^{2} b \tan \left (d x + c\right )^{2} + 12 \, b^{3} \tan \left (d x + c\right )^{2} - 12 \, a^{3} \tan \left (d x + c\right ) - 24 \, a b^{2} \tan \left (d x + c\right )}{b^{4}} + \frac {12 \, {\left (a^{4} + 2 \, a^{2} b^{2} + b^{4}\right )} \log \left ({\left | b \tan \left (d x + c\right ) + a \right |}\right )}{b^{5}}}{12 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 3.73, size = 119, normalized size = 1.03 \begin {gather*} \frac {{\mathrm {tan}\left (c+d\,x\right )}^4}{4\,b\,d}+\frac {{\mathrm {tan}\left (c+d\,x\right )}^2\,\left (\frac {1}{b}+\frac {a^2}{2\,b^3}\right )}{d}+\frac {\ln \left (a+b\,\mathrm {tan}\left (c+d\,x\right )\right )\,\left (a^4+2\,a^2\,b^2+b^4\right )}{b^5\,d}-\frac {a\,{\mathrm {tan}\left (c+d\,x\right )}^3}{3\,b^2\,d}-\frac {a\,\mathrm {tan}\left (c+d\,x\right )\,\left (\frac {2}{b}+\frac {a^2}{b^3}\right )}{b\,d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________